<?php
namespace app\index\middleware;

class CheckHyrLogin {
	/**
	 * 处理请求
	 *
	 * @param \think\Request $request
	 * @param \Closure       $next
	 * @return Response
	 */
	public function handle($request, \Closure $next) {
		if (!session('?uid')) {
			return redirect('/index/login.html');
		}elseif(session('utype')==2){
			return redirect('/index/loginout.html');
		}
		return $next($request);
	}
}